import API from "@/utils/request";

export function getPageRole({pageNum,pageSize,name}){
	return API.get('/role/page',{
		params:{
			pageNum,
			pageSize,
			name
		}
	})
}

export function getAllRole(){
	return API.get('/role')
}

export function getRoleById(id){
	return API.get(`/role/${id}`)
}

export function saveRole(Role){
	return API.post('/role',Role)
}

export function updateRole(Role){
	return API.put('/role',Role)
}

export function removeRole(id){
	return API.delete(`/role/${id}`)
}